<template>
  <div class="container">
    <van-nav-bar
      title="电影详情"
      left-text="返回"
      left-arrow
      @click-left="onClickLeft"
    />
    <div>
      <img :src="src" style="width: 100%" alt="">
    </div>
  </div>
</template>

<script>
import Vue from 'vue'
import { NavBar } from 'vant'
Vue.use(NavBar)

export default {
  data() {
    return {
      id: 0,
      src: require('@/assets/images/detail.png')
    }
  },

  mounted() {
    this.id = this.$route.query.id
    setTimeout(() => {
      this.src = require('@/assets/images/close.png')
    }, 2000)
  },

  methods: {
    onClickLeft() {
      // console.log(this.id)
      this.$router.back()
    }
  },
}
</script>

<style lang="stylus" scoped>
.container
  width 100%
  position absolute
  left 0
  top 0
</style>

<style lang='stylus'>
.van-nav-bar__content
  background-color #cd4e44
.van-nav-bar__title
  color #fff !important
.van-nav-bar__left
  i,span
    color #fff !important
</style>